package com.heima.feigns;

import com.heima.feigns.config.MyFeignAutoConfiguration;
import com.heima.feigns.fallback.BehaviorFallback;
import com.heima.model.behavior.pojos.ApBehaviorEntry;
import com.heima.model.common.dtos.ResponseResult;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "leadnews-behavior",fallbackFactory = BehaviorFallback.class,configuration = MyFeignAutoConfiguration.class)
public interface BehaviorFeign {

    @GetMapping("/api/v1/behavior_entry/one")
    ResponseResult<ApBehaviorEntry> findByUserIdOrEquipmentId(@RequestParam(value = "userId",required = false) Integer userId,
                                                                     @RequestParam(value = "equipmentId",required = false) Integer equipmentId);
}
